<%@ taglib uri="/WEB-INF/struts-bean.tld" prefix="bean" %>
<%@ taglib uri="/WEB-INF/struts-html.tld" prefix="html" %>
<%@ taglib uri="/WEB-INF/struts-logic.tld" prefix="logic" %>
<%@ taglib uri="/WEB-INF/struts-tiles.tld" prefix="tiles" %>
<%@ taglib uri="/WEB-INF/vectrics.tld"    prefix="vectrics" %>



<%@ page import="org.vectrics.hibernate.ThreadProperties" %>
<%@ page import="org.vectrics.domain.Domain" %>

<%
	
    String domainId = ThreadProperties.getUriDomainId();
	Domain domain = ThreadProperties.getDomain();
	String formAction = "/profile/" + domainId + "/save";
	
%>

<jsp:useBean 	id="recruitUserProfileForm" 
				class="org.vectrics.recruiter.struts.RecruitUserProfileForm" 
				scope="request"/>

<table width="500">
	<tr>
		<td valign="middle" >
			<html:form action="<%=formAction%>" focus="firstName" method="POST">
				<input type="hidden" name="newPerson" value="false"/>
				<input type="hidden" name="newUser" value="false"/>
				<html:hidden property="userId"/>
				<html:hidden property="userName"/>
				<html:hidden property="activeCandidate"/>
				<html:hidden property="travelPercent"/>
				<table width="100%">
					<tr>
						<td valign="middle"  width="100%">
							<table width="100%">
								<tr>
									<td valign="top"  width="50%">
										<font class="formLabelClass"><bean:message key="prompt.user.name" /></font>
									</td>
									<td valign="top" width="50%" >
										<html:text styleClass="formStaticClass" property="userName" readonly="true"/>
									</td>
								</tr>
								<tr>
									<td valign="top" >
										<font class="formLabelClass"><bean:message key="prompt.first.name" /><b> *</b></font>
									    <vectrics:errors property="firstName"/>
									</td>
									<td valign="top" >
										<html:text styleClass="formEditClass" property="firstName" maxlength="20" />
									</td>
								</tr>
								<tr>
									<td  valign="top">
										<font class="formLabelClass"><bean:message key="prompt.middle.name"/><b> *</b></font>
							            <vectrics:errors property="middleName"/>
									</td>
									<td  valign="top">
										<html:text property="middleName" styleClass="formEditClass" maxlength="20"/>
						           </td>
					            </tr>
								<tr>
									<td valign="top" >
										<font class="formLabelClass"><bean:message key="prompt.last.name"/><b> *</b></font>
										<vectrics:errors property="lastName"/>
									</td>
									<td valign="top" >
										<html:text styleClass="formEditClass" property="lastName" maxlength="25"/>
									</td>
								</tr>
								<tr>
									<td valign="top">
										<font class="formLabelClass"><bean:message key="prompt.previous.last.name"/></font>
										<vectrics:errors property="previousLastName"/>
									</td>
									<td  valign="top">
										<html:text property="previousLastName" styleClass="formEditClass" maxlength="20"/>
									</td>
					            </tr>
					            <tr>
									<td valign="top">
										<font class="formLabelClass"><bean:message key="prompt.name.known.as"/></font>
									</td>
									<td valign="top">
										<html:text property="knownAs" styleClass="formEditClass" maxlength="20"/>
									</td>
								</tr>
                                <tr>
									<td valign="top"><font class="formLabelClass"><bean:message key="prompt.name.prefix"/></font></td>
									<td valign="top"><html:text styleClass="formEditClass" property="prefix"/></td>
								</tr>	
								<tr>
									<td valign="top"><font class="formLabelClass"><bean:message key="prompt.gender"/></font></td>
									<td valign="top">
										<html:select property="gender" styleClass="formComboClass">
											<html:option value=""><bean:message key="prompt.not.given"/></html:option>
											<html:option value="m"><bean:message key="prompt.male"/></html:option>
											<html:option value="f"><bean:message key="prompt.female"/></html:option>
										</html:select>
									</td>
								</tr>		
								<tr>
									<td valign="top"><font class="formLabelClass"><bean:message key="prompt.marital.status"/></font></td>
									<td valign="top">
										<html:select property="maritalStatus" styleClass="formComboClass">
											<html:option value=""><bean:message key="prompt.not.given"/></html:option>
											<html:option value="m"><bean:message key="prompt.married"/></html:option>
											<html:option value="s"><bean:message key="prompt.not.married"/></html:option>
											<html:option value="d"><bean:message key="prompt.divorced"/></html:option>
										</html:select>
									</td>
								</tr>			
								<tr>
									<td valign="top" ><font class="formLabelClass"><bean:message key="prompt.primary.email"/><b> *</b></font>
									                  <vectrics:errors property="email"/>
									</td>
									<td valign="top" >
										<html:text styleClass="formEditClass" property="email"/>
									</td>
								</tr>
								<tr>
									<td valign="top"><font class="formLabelClass"><bean:message key="prompt.primary.email.format"/><b> *</b></font></td>
									<td valign="top">
										<html:select property="emailFormat" styleClass="formComboClass">
											<html:option value="html"><bean:message key="prompt.primary.email.format.html"/></html:option>
											<html:option value="text"><bean:message key="prompt.primary.email.format.text"/></html:option>
										</html:select>
									</td>
								</tr>
								
								<tr>
									<td valign="top" ><font class="formLabelClass"><bean:message key="prompt.secondary.email"/></font>
													  <vectrics:errors property="email2"/>
									</td>
									<td valign="top" >
										<html:text styleClass="formEditClass" property="email2"/>
									</td>
								</tr>
								<tr>
									<td valign="top"><font class="formLabelClass"><bean:message key="prompt.primary.email.format.2"/></font></td>
									<td valign="top">
										<html:select property="emailFormat2" styleClass="formComboClass">
											<html:option value="html"><bean:message key="prompt.primary.email.format.html"/></html:option>
											<html:option value="text"><bean:message key="prompt.primary.email.format.text"/></html:option>
										</html:select>
									</td>
								</tr>
								
								<tr>
									<td valign="top" ><font class="formLabelClass"><bean:message key="prompt.work.phone"/></font></td>
									<td valign="top" >
										<html:text styleClass="formEditClass" property="workPhone"/>
									</td>
								</tr>
								<tr>
									<td valign="top"  colspan="2"><table cellpadding="3" cellspacing="0"><tr><td valign="middle" ></td></tr></table></td>
								</tr>
								<tr>
									<td valign="top" ><font class="formLabelClass"><bean:message key="prompt.home.phone"/></font></td>
									<td valign="top" >
										<html:text styleClass="formEditClass" property="homePhone"/>
									</td>
								</tr>
								<tr>
									<td valign="top"  colspan="2"><table cellpadding="3" cellspacing="0"><tr><td valign="middle" ></td></tr></table></td>
								</tr>
								<tr>
									<td valign="top" ><font class="formLabelClass"><bean:message key="prompt.mobile.phone"/></font></td>
									<td valign="top" >
										<html:text styleClass="formEditClass" property="cellPhone"/>
									</td>
								</tr>
				                <tr>
									<td valign="top">
										<font class="formLabelClass">Highest Education</font>
									</td>
									<td valign="top">
										<html:select 
												name="recruitUserProfileForm" 
												property="highestEducationCode" 
												styleClass="formComboClass">
											  <html:options
											  		collection="personEducationTypes" 
											  		labelProperty="description" 
											  		property="code" />
										</html:select> 
									</td>
								</tr>
								<tr>
									<td colspan="2">
										<table cellpadding="0" cellspacing="0" width="100%">
											<tr>
												<td valign="top" width="50%" ><font class="formLabelClass">Career Goals</font></td>
												<td valign="top" width="50%" >
													<html:textarea rows="5" property="careerGoals" style="font-family:verdana,arial,sans serif;font-size=10px" cols="60" styleClass="formTextAreaClass"/>
												</td>
											</tr>
										</table>
									</td>
								</tr>
				         </table>
				         <br />
				         <table width="100%" >
				         	   <tr>
						           <td valign="TOP" colspan="2"><h3><bean:message key="heading.home.address"/></h3></td>
					           </tr>
					           <tr>
						          <td valign="top" width="50%"><font class="formLabelClass"><bean:message key="prompt.street.address"/></font></td>
						          <td valign="top" width="50%"><html:text styleClass="formEditClass" property="homeAddress1"/></td>
					           </tr>
					           <tr>
						          <td  valign="top" width="50%">
							          <font class="formLabelClass"><bean:message key="prompt.street.address2"/></font>
						          </td>
						          <td valign="top" width="50%"><html:text styleClass="formEditClass" property="homeAddress2"/></td>
					          </tr>
					          <tr>
						          <td valign="top" width="50%">
							          <font class="formLabelClass"><bean:message key="prompt.city"/></font>
						          </td>
						          <td valign="top" width="50%"><html:text styleClass="formEditClass" property="homeCity"/></td>
					          </tr>
					          <tr>
						          <td valign="top" width="50%"><font class="formLabelClass"><bean:message key="prompt.state"/></font></td>
						          <td valign="top" width="50%"><html:text styleClass="formEditClass" property="homeState"/></td>
					          </tr>
					          <tr>
						          <td valign="top" width="50%"><font class="formLabelClass"><bean:message key="prompt.postal.code"/></font></td>
						          <td valign="top" width="50%"><html:text styleClass="formEditClass" property="homeZip"/></td>
					          </tr>
          					  <tr>
			          			<td valign="TOP" colspan="2"><br><h3><bean:message key="heading.work.address"/></h3></td>
					          </tr>
					          <tr>
						          <td valign="top" width="50%"><font class="formLabelClass"><bean:message key="prompt.street.address"/></font></td>
						          <td valign="top" width="50%"><html:text styleClass="formEditClass" property="workAddress1"/></td>
					          </tr>
					          <tr>
						          <td  valign="top" width="50%">
							          <font class="formLabelClass"><bean:message key="prompt.street.address2"/></font>
						          </td>
          						<td valign="top" width="50%"><html:text styleClass="formEditClass" property="workAddress2"/></td>
          					</tr>
			          		<tr>
						          <td  valign="top" width="50%">
							          <font class="formLabelClass"><bean:message key="prompt.city"/></font>
						          </td>
					          	<td  valign="top" width="50%"><html:text styleClass="formEditClass" property="workCity"/></td>
					          </tr>
					          <tr>
						          <td  valign="top" width="50%"><font class="formLabelClass"><bean:message key="prompt.state"/></font></td>
						          <td  valign="top" width="50%"><html:text styleClass="formEditClass" property="workState"/></td>
					          </tr>
          					<tr>
						          <td  valign="top" width="50%"><font class="formLabelClass"><bean:message key="prompt.postal.code"/></font></td>
						          <td  valign="top" width="50%"><html:text styleClass="formEditClass" property="workZip" maxlength="12"/></td>
					        </tr>
			          </table>
			          <br/>
			          <table width="100%">
								<tr>
									<td valign="top" width="50%"><font class="formLabelClass">OK To Contact about Jobs</font></td>
									<td valign="top" width="50%" >
										<html:checkbox property="okToContact"/>
									</td>
								</tr>
								<tr>
									<td valign="top" width="50%"><font class="formLabelClass">Currently Working</font></td>
									<td valign="top" width="50%">
										<html:checkbox property="currentlyWorking"/>
									</td>
								</tr>
								
								<tr>
									<td valign="top" width="50%"><font class="formLabelClass">Will Accept Part-Time Work</font></td>
									<td valign="top" width="50%">
										<html:checkbox property="lookingPartTime"/>
									</td>
								</tr>
								<tr>
									<td valign="top" width="50%"><font class="formLabelClass">Will Accept Full-Time Work</font></td>
									<td valign="top" width="50%">
										<html:checkbox property="lookingFullTime"/>
									</td>
								</tr>
								<tr>
									<td valign="top" width="50%"><font class="formLabelClass">Will Accept Contract Work</font></td>
									<td valign="top" width="50%">
										<html:checkbox property="lookingContract"/>
									</td>
								</tr>
								<tr>
									<td valign="top" width="50%"><font class="formLabelClass">Will Accept Permanent Work</font></td>
									<td valign="top" width="50%">
										<html:checkbox property="lookingPermanent"/>
									</td>
								</tr>
								<tr>
									<td valign="top" colspan="2">
										<table>
											<tr>
												<td valign="top"  align="left"></td>
												<td valign="top"  align="left">
													<vectrics:formButton name="submit" code="public.button.ok" phraseCode="button.ok"/>
													&nbsp;
													<vectrics:formButton name="cancel" code="public.button.cancel" phraseCode="button.cancel"/>
												</td>
											</tr>
										</table>
									</td>
								</tr>
							</table>
						</td>
					</tr>
				</table>
			</html:form>
		</td>
	</tr>
</table>
